package com.jw.qme.socket.message;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import lombok.ToString;

import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;

/**
 * ClassName: com.jw.qme.socket
 * Datetime: 2025/4/4 下午10:23
 * Description:
 *
 * @author 汪佳泉
 * @version 1.0
 * @since 1.0
 */
@Data
@ToString
public class ChatMessage{

    // 消息ID
    private Long messageId;
    // 发送人ID
    private String senderId;
    // 接收人
    private String receiverId;
    // 接收群聊ID
    private String groupId;
    // 发送内容
    private String content;

    public ChatMessage(){}

    // 构造方法
    public ChatMessage(Long messageId, String senderId, String receiverId, String groupId,String content) {
        this.messageId = messageId;
        this.senderId = senderId;
        this.receiverId = receiverId;
        this.groupId = groupId;
        this.content = content;
    }

    public ChatMessage(String senderId, String receiverId, String content) {
        this.senderId = senderId;
        this.receiverId = receiverId;
        this.content = content;
    }


}
